/*
 * @ModuleName:
 * @Author: zhuzhaofeng
 * @Date: 2020-05-08 19:07:12
 */
const path = require("path");
module.exports = {
  lintOnSave: false,
  pluginOptions: {
    "style-resources-loader": {
      preProcessor: "scss",
      patterns: [
        // 需要全局导入的scss路径
        path.resolve(__dirname, "./src/assets/styles/variables.scss"),
        path.resolve(__dirname, "./src/assets/styles/common.scss"),
      ],
    },
  },
  devServer: {
    open: true,
    proxy: {
      "/api": {
        // 代理地址
        target: "http://localhost:3000",
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          // 路径重写
          "^/api": "",
        },
      },
    },
  },
};
